<?php defined('IN_PHPCMS') or exit('No permission resources.'); ?><?php include template('member', 'header'); ?>
<div class="layui-member-center">
	<?php include template('member', 'left'); ?>
	<div class="layui-modify-memberinfo">
		<div class="layui-avatar-auto">
			<div id="myContent"> 
				<p>Alternative content</p> 
			</div>
		</div>
		<script language="javascript" type="text/javascript" src="<?php echo $phpsso_api_url;?>/statics/js/swfobject.js"></script>
		<script type="text/javascript">
			var flashvars = {
				'upurl':"<?php echo $upurl;?>&callback=return_avatar&"
			}; 
			var params = {
				'align':'middle',
				'play':'true',
				'loop':'false',
				'scale':'showall',
				'wmode':'window',
				'devicefont':'true',
				'id':'Main',
				'bgcolor':'#ffffff',
				'name':'Main',
				'allowscriptaccess':'always'
			}; 
			var attributes = {
						
			}; 
			swfobject.embedSWF("<?php echo $phpsso_api_url;?>/statics/images/main.swf", "myContent", "490", "434", "9.0.0","<?php echo $phpsso_api_url;?>/statics/images/expressInstall.swf", flashvars, params, attributes);

			function return_avatar(data) {
				if(data == 1) {
					window.location.reload();
				} else {
					alert('failure');
				}
			}
		</script> 
		<ul class="layui-avatar-list" id="avatarlist">
			<?php $n=1; if(is_array($avatar)) foreach($avatar AS $k => $v) { ?>
			<li>
				<img src="<?php echo $v;?>" height="<?php echo $k;?>" width="<?php echo $k;?>" onerror="this.src='<?php echo $phpsso_api_url;?>/statics/images/member/nophoto.gif'"><br />
				<?php echo L('avatar');?><?php echo $k;?> x <?php echo $k;?>
			</li>
			<?php $n++;}unset($n); ?>
		</ul>
	</div>
</div>
<?php include template('member', 'footer'); ?>